package org.vpm.mediaplayer;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class MediaPlayerActivity extends TabActivity {
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		
		Resources res = getResources();
		TabHost tabHost = getTabHost();
		TabHost.TabSpec spec;
		Intent intent;
		
		// create an intent to launch an activity
		intent = new Intent().setClass(this, DateActivity.class);
		
		// Initialize a TabSpec for each tab and add it to the TabHost
		spec = tabHost.newTabSpec("date").setIndicator("Date", res.getDrawable(R.drawable.ic_tab_date)).setContent(intent);
		tabHost.addTab(spec);
		
		intent = new Intent().setClass(this, SeriesActivity.class);
		spec = tabHost.newTabSpec("series").setIndicator("Series", res.getDrawable(R.drawable.ic_tab_series)).setContent(intent);
		tabHost.addTab(spec);
		
		intent = new Intent().setClass(this, SpeakerActivity.class);
		spec = tabHost.newTabSpec("speaker").setIndicator("Speaker", res.getDrawable(R.drawable.ic_tab_speaker)).setContent(intent);
		tabHost.addTab(spec);
		
		intent = new Intent().setClass(this, TopicActivity.class);
		spec = tabHost.newTabSpec("topic").setIndicator("Topic", res.getDrawable(R.drawable.ic_tab_topic)).setContent(intent);
		tabHost.addTab(spec);
		
		tabHost.setCurrentTab(0);
	}
}
